package com.toilet.easyvideo.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.toilet.easyvideo.domain.CheckFile;
import com.toilet.easyvideo.service.CheckFileService;
import com.toilet.easyvideo.mapper.CheckFileMapper;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.stream.Collectors;

/**
 * @author 11
 * @description 针对表【check_file】的数据库操作Service实现
 * @createDate 2023-12-06 21:55:25
 */
@Service
public class CheckFileServiceImpl extends ServiceImpl<CheckFileMapper, CheckFile>
        implements CheckFileService {

    @Override
    public List<Long> selectChunkListByMd5(String md5) {
        List<CheckFile> list = lambdaQuery().eq(CheckFile::getCheckMd5, md5).list();
        return list.stream().map(CheckFile::getCheckIndex).toList();
    }
}




